#include<iostream>
using namespace std;
int main()
{
    int a,aux;
    int suma=0;
    cin>>a;
    aux=a-1;
    while(a>aux)
{
      suma=suma+a;
      aux=a;
      cin>>a;

    }
        cout<<suma;
        return 1 ;
}
